<!-- 适用于EPC/PPP项目 下对应的 表单 -->
<template>
  <div class="mt20">
    <custom-form key="OtherForm1" ref="OtherForm1" :editModel="''" :is-validate="true" :rules="rules" :form="otherform1" :form-list="formOption" @change="handleChange"></custom-form>
  </div>
</template>

<script>
export default {
  name: 'OtherForm1',
  props: {
    form: Object,
    queryInfo: Object,
  },
  data() {
    return {
      otherform1: {},
      formOption: [
        {
          label: '设计目标',
          keyName: 'goal',
          type: 'BaseTextarea',
          span: 24,
          placeholder: '对绿色建筑星级认证、设计获奖等要求，长度不超过300'
        },
        {
          label: '设计单位资质要求',
          keyName: 'certification',
          type: 'BaseTextarea',
          span: 24,
          placeholder: '请输入，长度不超过300'
        },
        {
          label: '设计人员要求',
          keyName: 'designersRequirement',
          type: 'BaseTextarea',
          span: 24,
          placeholder: '对从事该项目的设计人员注册资质、职称等的额外要求，长度不超过300'
        },
        {
          label: '设计过程控制要点及进度',
          keyName: 'processControl',
          type: 'BaseTextarea',
          span: 24,
          placeholder: '可简要描述关键节点，或在合同及任务书中详细规定，长度不超过300'
        },
        {
          label: '设计与采购、施工及试运行的接口及要求',
          keyName: 'procurement',
          type: 'BaseTextarea',
          span: 24,
          placeholder: '请输入，长度不超过300'
        },
        {
          label: '深化设计单位选择标准',
          keyName: 'selectionCriteria',
          type: 'BaseTextarea',
          span: 24,
          placeholder: '请输入，长度不超过300'
        },
        {
          label: '其他要求',
          keyName: 'otherRequirement',
          type: 'BaseTextarea',
          span: 24,
          placeholder: '请输入，长度不超过300'
        }
      ],
      rules: {
        goal: [{ required: true, message: '请输入', trigger: 'change' }],
        certification: [{ required: true, message: '请输入', trigger: 'change' }],
        designersRequirement: [{ required: true, message: '请输入', trigger: 'change' }],
        processControl: [{ required: true, message: '请输入', trigger: 'change' }],
        procurement: [{ required: true, message: '请输入', trigger: 'change' }],
        selectionCriteria: [{ required: true, message: '请输入', trigger: 'change' }]
      }
    }
  },

  watch: {
    'form.planType': {
      handler(val) {
        if (val !== null && val !== undefined) {
          const keys = ['goal', 'certification', 'designersRequirement', 'processControl', 'procurement', 'selectionCriteria', 'otherRequirement']
          keys.map((key) => {
            this.$set(this.otherform1, key, this.form[key])
          })
        }
      },
      immediate: true
    },
    queryInfo: {
      handler(val) {
        if (val.pageType == 'detail') {
          this.formOption.map(v => {
            v.disabled = true
          })
        }
      },
      immediate: true,
      deep: true
    }
  },

  components: {},

  computed: {},

  created() {},

  mounted() {},

  methods: {
    handleChange() {}
  }
}
</script>
<style lang='less' scoped>
</style>